import request from '../utils/request';
//公共业务接口文档
const api = {
  //上传单个文件（通用上传文件）
  UploadSingleFile(data?: any) {
    return request({
      url: '/api/ExcuteUploadFile/UploadSingleFile',
      method: 'post',
      headers: {
        'Content-Type': 'multipart/form-data',
      },
      data,
    });
  },
  //上传图片文件
  UploadImageFile(data?: any) {
    return request({
      url: '/api/ExcuteUploadFile/UploadImageFile',
      method: 'post',
      headers: {
        'Content-Type': 'multipart/form-data',
      },
      data,
    });
  },
  //分页查询指定关联code的通用文件
  GetPageFileStorages(data?: any) {
    return request({
      url: '/api/ExcuteUploadFile/GetPageFileStorages',
      method: 'post',
      data,
    });
  },
  //上传多个文件到通用文件存储
  UploadMoreFilesToFileStorage(data?: any) {
    return request({
      url: '/api/ExcuteUploadFile/UploadMoreFilesToFileStorage',
      method: 'post',
      headers: {
        'Content-Type': 'multipart/form-data',
      },
      data,
    });
  },
  //删除指定文件
  DeleteFileStorageByFileStorageCode(data?: any) {
    return request({
      url: '/api/ExcuteUploadFile/DeleteFileStorageByFileStorageCode',
      method: 'post',
      data,
    });
  },
};
//业务开单接口
export default api;
